package com.aidex.system.service;

import com.aidex.common.core.service.BaseService;
import com.aidex.risk.domain.*;
import com.aidex.system.domain.*;
import com.fasterxml.jackson.core.JsonProcessingException;

import java.util.Calendar;
import java.util.Date;
import java.util.List;

/**
 * 运单管理Service接口
 * @author jmy
 * @email jmyinjg@163.com
 * @date 2021-10-04
 */
public interface WaybillService extends BaseService<Waybill>
{

    /**
     * 批量删除运单管理
     * @param ids 需要删除的运单管理ID集合
     * @return 结果
     */
    int deleteWaybillByIds(String[] ids);

    /**
     * 获取运单
     *
     * @param waybillNo
     * @param dataSource
     * @return
     */
    Waybill get(String waybillNo, String dataSource);
    void syncWlptTestClass();
    Waybill getUnSend(String waybillNo);
    /**
     * 删除运单
     *
     * @param waybillNo
     * @param dataSource
     */
    void deleteWaybillByBillno(String waybillNo, String dataSource);
    resultResponseT<wlpt_diff_producet_queryResponse> queryDiffProducetCommonLevel(Waybill waybill) throws JsonProcessingException;
    resultResponseT<wlpt_agent_scoreResponse> queryTradeAgentLevel(Waybill waybill) throws JsonProcessingException;
    SyncEmergencyFlight queryEmergencyFlight(Waybill waybill);


    void queryVCsis(Integer day) throws JsonProcessingException;
    boolean Save(syncMethod<transData> info);
    List<VCsisBusinessAsd> queryVCsisBusinessAsd(Calendar calendar) throws JsonProcessingException;
    List<VCsisBusinessRecord> queryVCsisBusinessRecord(String waybillno) throws JsonProcessingException;
    List<VCsisBusinessRelease> queryVCsisBusinessRelease(String waybillno)throws JsonProcessingException;
    List<VCsisBusinessUnpacking> queryVCsisBusinessUnpacking(String waybillno) throws JsonProcessingException;
    gays_flfj_class_push_api createTrade(Waybill waybill, List<WaybillDetail>  details);
    String sendTradeGoodsRiskByWaybillApi(String waybillNO,String datasource);
    List<Waybill> findListByFlight( String flightNo,  Date flightDate);
    wlpt_special_goods_Response queryWlptSpecialGoods(Integer pageIndex);
    wlpt_agent_score_classification_Response queryWlptTestClass(Integer pageIndex);
    void syncWlptSpecialGoods();
    /**
     * 定时批量处理运单结果
     *
     * @param limit
     */
    void handleBatchWaybill(Integer limit);

    /**
     * 处理单个运单
     * @param waybill
     */
    void handleWaybill(Waybill waybill);

    /**
     * 定时推送运单
     *
     * @param limit
     */
    void handleSendWaybill(Integer limit);


    resultResponseT<airlineCargoResponse> queryAirlineCargo(airlineCargoRequest info);

    resultResponseT<securityCheckResponse> querySecurityCheck(securityCheckRequest info);

    resultResponseT<agentCreditResponse> queryAgentCredit(agentCreditRequest info);

    resultResponseT<String> queryAirline();


    resultResponseT<airlineCargoResponse> queryAirlinePieceCargo(airlineCargoRequest info);

}
